\hypertarget{classUDPClient}{
\section{UDPClient Class Reference}
\label{classUDPClient}\index{UDPClient@{UDPClient}}
}
Inheritance diagram for UDPClient::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classUDPClient}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classUDPClient_8e66a3b64581f3040cd78f8379ddca9c}{UDPClient} ()
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hyperlink{classUDPClient_3618ba7deb15410bab8f3fa3afff65cb}{UDPClient} (const std::string \&IP, boost::uint16\_\-t port)
\begin{CompactList}\small\item\em Creates an instance of an UDP socket suitable for client communication and sets server address from specified IP and port. \item\end{CompactList}\item 
\hyperlink{classUDPClient_291a01ff4b74fe330832f5066fc2bad8}{UDPClient} (const \hyperlink{classAddress}{Address} \&address)
\begin{CompactList}\small\item\em Creates an instance of an UDP socket suitable for client communication and sets server address. \item\end{CompactList}\item 
\hypertarget{classUDPClient_34f070027c8fa69813efcf9100d7e35d}{
\hyperlink{classUDPClient_34f070027c8fa69813efcf9100d7e35d}{$\sim$UDPClient} ()}
\label{classUDPClient_34f070027c8fa69813efcf9100d7e35d}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
const \hyperlink{classAddress}{Address} \& \hyperlink{classUDPClient_1d8ded9ca3c5eecbca48404d4a68f383}{getAddress} () const 
\begin{CompactList}\small\item\em Gets server address object. \item\end{CompactList}\item 
void \hyperlink{classUDPClient_07620a77f0dffff7a2706905185064db}{setAddress} (const std::string \&IP, boost::uint16\_\-t port)
\begin{CompactList}\small\item\em Sets server address using provided IP and port. \item\end{CompactList}\item 
void \hyperlink{classUDPClient_cf88a45e917c9de82ad75b3485a8a3ad}{setAddress} (const \hyperlink{classAddress}{Address} \&address)
\begin{CompactList}\small\item\em Sets server address object. \item\end{CompactList}\item 
\hypertarget{classUDPClient_d55f8a9c56842c1a888c9418bfaee346}{
void \hyperlink{classUDPClient_d55f8a9c56842c1a888c9418bfaee346}{resolve} ()}
\label{classUDPClient_d55f8a9c56842c1a888c9418bfaee346}

\begin{CompactList}\small\item\em Resolves server location. \item\end{CompactList}\item 
void \hyperlink{classUDPClient_ea85844daa23c52eacbc4383fcf6fe42}{resolve} (const std::string \&IP, boost::uint16\_\-t port)
\begin{CompactList}\small\item\em Sets server address, then resolves server location. \item\end{CompactList}\item 
void \hyperlink{classUDPClient_227406c79dc19695011d9730b6346f1c}{resolve} (const \hyperlink{classAddress}{Address} \&address)
\begin{CompactList}\small\item\em Sets server address, then resolves server location. \item\end{CompactList}\item 
size\_\-t \hyperlink{classUDPClient_b0bb386fbae0a70b13f0f06fa1ada3b4}{send} (char $\ast$src\_\-buf, size\_\-t buf\_\-len)
\begin{CompactList}\small\item\em Sends requests over UDP to the server. \item\end{CompactList}\item 
size\_\-t \hyperlink{classUDPClient_9815d3657997a5799d5caf835a151ecb}{send} (const size\_\-t \&size)
\begin{CompactList}\small\item\em Sends a size\_\-t type over UDP to the server. \item\end{CompactList}\item 
size\_\-t \hyperlink{classUDPClient_ee5513639071ab06dbf60c1ce4ceece0}{send} (const std::string \&str)
\begin{CompactList}\small\item\em Sends a string over UDP to the server. \item\end{CompactList}\item 
size\_\-t \hyperlink{classUDPClient_4719ca9fe37b62704d7ed8087eaf0d0c}{receive} (char $\ast$dest\_\-buf, size\_\-t buf\_\-len)
\begin{CompactList}\small\item\em Receives responses over UDP from the server. \item\end{CompactList}\item 
size\_\-t \hyperlink{classUDPClient_5f104c5f992b3e6186cd1bfd86f22f8a}{receive} (size\_\-t \&size)
\begin{CompactList}\small\item\em Receives a size\_\-t type over UDP from the server. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
UDP Client

Basic implementation of an UDP Client. In order to use this class, there should be an existing server ready to accept connections. First, it is required to resolve server endpoint, either in construction step, or later with the \hyperlink{classUDPClient_d55f8a9c56842c1a888c9418bfaee346}{resolve()} method. After that, the client is ready to submit requests via the \hyperlink{classUDPClient_b0bb386fbae0a70b13f0f06fa1ada3b4}{send()} method. Server response may be collected with the \hyperlink{classUDPClient_4719ca9fe37b62704d7ed8087eaf0d0c}{receive()} method. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classUDPClient_8e66a3b64581f3040cd78f8379ddca9c}{
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\subsubsection[UDPClient]{\setlength{\rightskip}{0pt plus 5cm}UDPClient::UDPClient ()\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_8e66a3b64581f3040cd78f8379ddca9c}


Default constructor. 

Creates an instance of an UDP socket suitable for client communication. \hypertarget{classUDPClient_3618ba7deb15410bab8f3fa3afff65cb}{
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\subsubsection[UDPClient]{\setlength{\rightskip}{0pt plus 5cm}UDPClient::UDPClient (const std::string \& {\em IP}, \/  boost::uint16\_\-t {\em port})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_3618ba7deb15410bab8f3fa3afff65cb}


Creates an instance of an UDP socket suitable for client communication and sets server address from specified IP and port. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em IP}]Provided IP address. \item[{\em port}]Provided port. \end{description}
\end{Desc}
\hypertarget{classUDPClient_291a01ff4b74fe330832f5066fc2bad8}{
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\index{UDPClient@{UDPClient}!UDPClient@{UDPClient}}
\subsubsection[UDPClient]{\setlength{\rightskip}{0pt plus 5cm}UDPClient::UDPClient (const {\bf Address} \& {\em address})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_291a01ff4b74fe330832f5066fc2bad8}


Creates an instance of an UDP socket suitable for client communication and sets server address. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]Provided \hyperlink{classAddress}{Address} object. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\hypertarget{classUDPClient_1d8ded9ca3c5eecbca48404d4a68f383}{
\index{UDPClient@{UDPClient}!getAddress@{getAddress}}
\index{getAddress@{getAddress}!UDPClient@{UDPClient}}
\subsubsection[getAddress]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Address}\& UDPClient::getAddress () const\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_1d8ded9ca3c5eecbca48404d4a68f383}


Gets server address object. 

\begin{Desc}
\item[Returns:]Server \hyperlink{classAddress}{Address}. \end{Desc}
\hypertarget{classUDPClient_07620a77f0dffff7a2706905185064db}{
\index{UDPClient@{UDPClient}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!UDPClient@{UDPClient}}
\subsubsection[setAddress]{\setlength{\rightskip}{0pt plus 5cm}void UDPClient::setAddress (const std::string \& {\em IP}, \/  boost::uint16\_\-t {\em port})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_07620a77f0dffff7a2706905185064db}


Sets server address using provided IP and port. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em IP}]Provided IP address. \item[{\em port}]Provided port. \end{description}
\end{Desc}
\hypertarget{classUDPClient_cf88a45e917c9de82ad75b3485a8a3ad}{
\index{UDPClient@{UDPClient}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!UDPClient@{UDPClient}}
\subsubsection[setAddress]{\setlength{\rightskip}{0pt plus 5cm}void UDPClient::setAddress (const {\bf Address} \& {\em address})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_cf88a45e917c9de82ad75b3485a8a3ad}


Sets server address object. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]Provided \hyperlink{classAddress}{Address} object. \end{description}
\end{Desc}
\hypertarget{classUDPClient_ea85844daa23c52eacbc4383fcf6fe42}{
\index{UDPClient@{UDPClient}!resolve@{resolve}}
\index{resolve@{resolve}!UDPClient@{UDPClient}}
\subsubsection[resolve]{\setlength{\rightskip}{0pt plus 5cm}void UDPClient::resolve (const std::string \& {\em IP}, \/  boost::uint16\_\-t {\em port})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_ea85844daa23c52eacbc4383fcf6fe42}


Sets server address, then resolves server location. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em IP}]Provided IP address. \item[{\em port}]Provided port. \end{description}
\end{Desc}
\hypertarget{classUDPClient_227406c79dc19695011d9730b6346f1c}{
\index{UDPClient@{UDPClient}!resolve@{resolve}}
\index{resolve@{resolve}!UDPClient@{UDPClient}}
\subsubsection[resolve]{\setlength{\rightskip}{0pt plus 5cm}void UDPClient::resolve (const {\bf Address} \& {\em address})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPClient_227406c79dc19695011d9730b6346f1c}


Sets server address, then resolves server location. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]Provided \hyperlink{classAddress}{Address} object. \end{description}
\end{Desc}
\hypertarget{classUDPClient_b0bb386fbae0a70b13f0f06fa1ada3b4}{
\index{UDPClient@{UDPClient}!send@{send}}
\index{send@{send}!UDPClient@{UDPClient}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t UDPClient::send (char $\ast$ {\em src\_\-buf}, \/  size\_\-t {\em buf\_\-len})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classUDPClient_b0bb386fbae0a70b13f0f06fa1ada3b4}


Sends requests over UDP to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src\_\-buf}]A char pointer containing the source buffer. \item[{\em buf\_\-len}]Provided buffer length. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes transmitted. \end{Desc}


Implements \hyperlink{classUDPSenderReceiver_0bdb1089fff9950011278edd2e90f803}{UDPSenderReceiver}.\hypertarget{classUDPClient_9815d3657997a5799d5caf835a151ecb}{
\index{UDPClient@{UDPClient}!send@{send}}
\index{send@{send}!UDPClient@{UDPClient}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t UDPClient::send (const size\_\-t \& {\em size})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classUDPClient_9815d3657997a5799d5caf835a151ecb}


Sends a size\_\-t type over UDP to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]The provided value to send. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes transmitted. \end{Desc}


Implements \hyperlink{classUDPSenderReceiver_2f8559cc694cce83608f8af6b3269d95}{UDPSenderReceiver}.\hypertarget{classUDPClient_ee5513639071ab06dbf60c1ce4ceece0}{
\index{UDPClient@{UDPClient}!send@{send}}
\index{send@{send}!UDPClient@{UDPClient}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t UDPClient::send (const std::string \& {\em str})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classUDPClient_ee5513639071ab06dbf60c1ce4ceece0}


Sends a string over UDP to the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]The provided string to send. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes transmitted. \end{Desc}


Implements \hyperlink{classUDPSenderReceiver_7aac76170c4bf735c59d2012d1ba336f}{UDPSenderReceiver}.\hypertarget{classUDPClient_4719ca9fe37b62704d7ed8087eaf0d0c}{
\index{UDPClient@{UDPClient}!receive@{receive}}
\index{receive@{receive}!UDPClient@{UDPClient}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t UDPClient::receive (char $\ast$ {\em dest\_\-buf}, \/  size\_\-t {\em buf\_\-len})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classUDPClient_4719ca9fe37b62704d7ed8087eaf0d0c}


Receives responses over UDP from the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dest\_\-buf}]The provided char pointer to fill. \item[{\em buf\_\-len}]provided buffer length. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes transmitted. \end{Desc}


Implements \hyperlink{classUDPSenderReceiver_c4be359228c97971be27fad0392c49b0}{UDPSenderReceiver}.\hypertarget{classUDPClient_5f104c5f992b3e6186cd1bfd86f22f8a}{
\index{UDPClient@{UDPClient}!receive@{receive}}
\index{receive@{receive}!UDPClient@{UDPClient}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t UDPClient::receive (size\_\-t \& {\em size})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classUDPClient_5f104c5f992b3e6186cd1bfd86f22f8a}


Receives a size\_\-t type over UDP from the server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]A reference to the size\_\-t to write. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes transmitted. \end{Desc}


Implements \hyperlink{classUDPSenderReceiver_0bf1277afc02d7824af00b55bdadc448}{UDPSenderReceiver}.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{udpclient_8cpp}{udpclient.cpp}\end{CompactItemize}
